package cn.iocoder.yudao.module.shop.info.dal.mysql;

import cn.iocoder.yudao.framework.business.basic.dao.mapper.CoreMapper;
import cn.iocoder.yudao.framework.business.basic.dao.query.CoreLambdaQueryWrapper;
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.module.shop.info.dal.dataobject.ShopEnterOrderDO;
import cn.iocoder.yudao.module.shop.info.vo.ShopEnterOrderPageReqVO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 店铺入驻缴费 Mapper
 *
 * @author 山野羡民（1032694760@qq.com）
 */
@Mapper
public interface ShopEnterOrderMapper extends CoreMapper<ShopEnterOrderDO> {

    default PageResult<ShopEnterOrderDO> selectPage(ShopEnterOrderPageReqVO reqVO) {
        return selectPage(reqVO, new CoreLambdaQueryWrapper<ShopEnterOrderDO>()
                .eqIfPresent(ShopEnterOrderDO::getEnterPackageId, reqVO.getEnterPackageId())
                .eqIfPresent(ShopEnterOrderDO::getPayed, reqVO.getPayed())
                .eqIfPresent(ShopEnterOrderDO::getRefunded, reqVO.getRefunded())
                .eqIfPresent(ShopEnterOrderDO::getRemark, reqVO.getRemark())
                .betweenIfPresent(ShopEnterOrderDO::getCreateTime, reqVO.getCreateTime())
                .orderByDesc(ShopEnterOrderDO::getId));
    }

}
